/********************************************************************************
 *      Copyright:  (C) 2022 Zhang Changxing<ZhangChangxingVIP@163.com>
 *                  All rights reserved.
 *
 *       Filename:  ds18b20.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(04/13/2022)
 *         Author:  Zhang Changxing <ZhangChangxingVIP@163.com>
 *      ChangeLog:  1, Release initial version on "04/13/2022 01:22:41 AM"
 *                 
 ********************************************************************************/

#ifndef  _DS18B20_H_
#define  _DS18B20_H_


#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/time.h>        
#include <arpa/inet.h>
#include <sys/types.h>   
#include <sys/socket.h>
#include <time.h>

#include "logger.h"

/*---------------------------------------------------------------------
 *   description:   Read the temperature on ds18b20
 *          args:   $temp:    Store the temperature obtained
 *  return value:   <0: failure,    =0:ok 
 *---------------------------------------------------------------------*/
int temperature(float *temp);

  

/*---------------------------------------------------------------------
 *   description:   To get the time
 *          args:   $datime:    The time used to store the fetch
 *  return value:   Get the latest time
 *---------------------------------------------------------------------*/
double getime(char *datime);

#endif   /* ----- #ifndef _DS18B20_H_  ----- */


